else
GTK_WIDGET_CLASS (gtk_application_window_parent_class)
->size_allocate (widget, allocation);
+
+ gtk_widget_set_clip (widget, allocation);
}
static void
GtkBin *bin = GTK_BIN (widget);
GtkBinPrivate *priv = bin->priv;
- gtk_widget_set_allocation (widget, allocation);
-
if (priv->child && gtk_widget_get_visible (priv->child))
{
+ GtkAllocation clip = *allocation;
+
gtk_widget_size_allocate (priv->child, allocation);
+ gtk_widget_get_clip (priv->child, &clip);
+
+ gtk_widget_set_clip (widget, &clip);
}
}
}
}
}
+
+ gtk_widget_set_clip (widget, allocation);
}
\f
{
GtkColorButton *button = GTK_COLOR_BUTTON (widget);
GtkColorButtonPrivate *priv = gtk_color_button_get_instance_private (button);
-
- GTK_WIDGET_CLASS (gtk_color_button_parent_class)->size_allocate (widget, allocation);
+ GtkAllocation clip = *allocation;
gtk_widget_size_allocate (priv->button, allocation);
+ gtk_widget_get_clip (priv->button, &clip);
+
+ gtk_widget_set_clip (widget, &clip);
}
static void
{
GtkColorPlane *plane = GTK_COLOR_PLANE (widget);
- GTK_WIDGET_CLASS (gtk_color_plane_parent_class)->size_allocate (widget, allocation);
-
create_surface (plane);
+ gtk_widget_set_clip (widget, allocation);
}
static void
{
GtkFileChooserButton *button = GTK_FILE_CHOOSER_BUTTON (widget);
GtkFileChooserButtonPrivate *priv = gtk_file_chooser_button_get_instance_private (button);
-
- GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->size_allocate (widget, allocation);
+ GtkAllocation clip = *allocation;
gtk_widget_size_allocate (priv->child, allocation);
+ gtk_widget_get_clip (priv->child, &clip);
+
+ gtk_widget_set_clip (widget, &clip);
}
static void
{
GtkFontButton *button = GTK_FONT_BUTTON (widget);
GtkFontButtonPrivate *priv = gtk_font_button_get_instance_private (button);
-
- GTK_WIDGET_CLASS (gtk_font_button_parent_class)->size_allocate (widget, allocation);
+ GtkAllocation clip = *allocation;
gtk_widget_size_allocate (priv->button, allocation);
+ gtk_widget_get_clip (priv->button, &clip);
+
+ gtk_widget_set_clip (widget, &clip);
}
static void
GtkAllocation *allocation)
{
GtkHeaderBarPrivate *priv = gtk_header_bar_get_instance_private (GTK_HEADER_BAR (widget));
- GtkAllocation clip;
+ GtkAllocation clip = *allocation;
GtkWidget *title_widget;
GtkHeaderBar *bar = GTK_HEADER_BAR (widget);
GtkRequestedSize *sizes;
{
GtkIconView *icon_view = GTK_ICON_VIEW (widget);
- gtk_widget_set_allocation (widget, allocation);
-
gtk_icon_view_layout (icon_view);
if (gtk_widget_get_realized (widget))
/* Emit any pending signals now */
g_object_thaw_notify (G_OBJECT (icon_view->priv->hadjustment));
g_object_thaw_notify (G_OBJECT (icon_view->priv->vadjustment));
+
+ gtk_widget_set_clip (widget, allocation);
}
static void
gtk_image_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
- GtkAllocation clip;
+ GtkAllocation clip = *allocation;
GdkRectangle extents;
_gtk_style_context_get_icon_extents (gtk_widget_get_style_context (widget),
gdk_rectangle_union (&clip, &child_clip, &clip);
if (!priv->show_text)
- return;
+ {
+ gtk_widget_set_clip (widget, &clip);
+ return;
+ }
gtk_widget_measure (priv->label, GTK_ORIENTATION_HORIZONTAL, -1,
&text_min, &text_nat,
int bin_x, bin_y;
GtkRevealerTransitionType transition;
GtkBorder padding;
+ GtkAllocation clip = *allocation;
g_return_if_fail (allocation != NULL);
- gtk_widget_set_allocation (widget, allocation);
gtk_revealer_get_child_allocation (revealer, allocation, &child_allocation);
child = gtk_bin_get_child (GTK_BIN (revealer));
if (child != NULL && gtk_widget_get_visible (child))
- gtk_widget_size_allocate (child, &child_allocation);
+ {
+ gtk_widget_size_allocate (child, &child_allocation);
+ gtk_widget_get_clip (child, &clip);
+ }
if (gtk_widget_get_realized (widget))
{
bin_y + allocation->y,
child_allocation.width, child_allocation.height);
}
+
+ gtk_widget_set_clip (widget, &clip);
}
static void
*/
if (size_changed)
gtk_widget_queue_draw (widget);
+
+ gtk_widget_set_clip (widget, allocation);
}
static void
gtk_widget_size_allocate (child, &child_allocation);
gtk_window_restack_popovers (window);
+
+ gtk_widget_set_clip (widget, allocation);
}
static gint